import type { App } from 'vue'

import {
  ElAside,
  ElButton,
  ElCol,
  ElContainer,
  ElDatePicker,
  ElDialog,
  ElForm,
  ElFormItem,
  ElIcon,
  ElInput,
  ElMenu,
  ElMenuItem,
  ElMenuItemGroup,
  ElOption,
  ElRadioButton,
  ElRadioGroup,
  ElRow,
  ElSelect,
  ElSubMenu,
  ElTabPane,
  ElTabs
} from 'element-plus'

const components = [
  ElButton,
  ElInput,
  ElIcon,
  ElRow,
  ElCol,
  ElDialog,
  ElFormItem,
  ElForm,
  ElSelect,
  ElOption,
  ElDatePicker,
  ElContainer,
  ElAside,
  ElRadioGroup,
  ElRadioButton,
  ElMenu,
  ElSubMenu,
  ElMenuItemGroup,
  ElMenuItem,
  ElTabPane,
  ElTabs
]

//按需导出组件
export default function (app: App): void {
  for (const component of components) {
    app.component(component.name, component)
  }
}
